<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/bizappproject/sale_partner_monthly_statics/sale_partner_monthly_statics.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/bizappproject/sale_partner_monthly_statics/sale_partner_monthly_statics.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "sale_partner_monthly_statics",
        setup() {
            const table = ref({
                key: "id",
                footer: "Foots",
                cnName: "销售客户月度统计",
                name: "sale_partner_monthly_statics/sale_partner_monthly_statics",
                newTabEdit: false,
                url: "/sale_partner_monthly_statics/",
                sortName: "id"
            });
            const editFormFields = ref({"year":"","contract_amount":"","delivery_amount":"","budget_amount":"","last_contract_amount":"","last_year_delivery_amount":""});
            const editFormOptions = ref([[{"title":"年","field":"year"}],
                              [{"title":"合同金额","field":"contract_amount","type":"decimal"},
                               {"title":"发货金额","field":"delivery_amount","type":"decimal"}],
                              [{"title":"预算金额","field":"budget_amount","type":"decimal"},
                               {"title":"去年合同金额","field":"last_contract_amount","type":"decimal"}],
                              [{"title":"去年发货金额","field":"last_year_delivery_amount","type":"decimal"}]]);
            const searchFormFields = ref({"year":"","factory":""});
            const searchFormOptions = ref([[{"title":"年","field":"year","type":"="},{"title":"工厂","field":"factory","type":"like"}]]);
            const columns = ref([{field:"id",title:"id",type:"int",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"year",title:"年",type:"string",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"contract_amount",title:"合同金额",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"delivery_amount",title:"发货金额",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"budget_amount",title:"预算金额",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"last_contract_amount",title:"去年合同金额",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"last_year_delivery_amount",title:"去年发货金额",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"factory",title:"工厂",type:"string",sort:true,width:120,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
